<%@page import="entities.Article"%>
<%
Article article = (Article) request.getAttribute("article");
String url = "";
if (article != null) {
	url = "/accept-article?id=" + article.getId() + "&key=" + article.getAuthKey();
}
String success = (String) request.getAttribute("success");
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp" />
            
            <div id="mainContent" class="left">
            	<div id="errorPage">
            		<% if (article != null && !article.isPublished()) { %>
                	<h3 class="title">Publish article: <%=article.getTitle() %></h3>
                    <p>Do you want to publish article ?</p>
                    <a href="/">Cancel and goto home</a> 
                    <a href="<%=url %>&action=yes">Yes, accept this link</a>
                    <% } else if (success != null) { %>
                    <h3 class="title">Publish Success.</h3>
                    <p><%=success %>. Please go to <a href="/">home</a>. Thank</p>
                    <% } else { %>
                    <h3 class="title">Page not found!</h3>
                    <p>This link has been remove or not exists. Please go to <a href="/">home</a>. Thank</p>
                    <% } %>
                </div>
            </div>
            
            <jsp:include page="/elements/right.jsp" />
            
            <div class="clearbreak"></div>
<jsp:include page="/layouts/footer.jsp" />